Remove unnecessary PathSource update in cargo test
authorCarol (Nichols || Goulding) <carol.nichols@gmail.com>
Sat, 19 Sep 2015 18:39:34 +0000 (14:39 -0400)
committerCarol (Nichols || Goulding) <carol.nichols@gmail.com>
Sun, 20 Sep 2015 03:30:44 +0000 (23:30 -0400)
I don't think updating the source here is hurting anything, per se, it's
just unnecessary since ops::compile makes a PathSource and then calls
root_package, which will call update if it needs to.

src/cargo/ops/cargo_test.rs

index 8b5ca97a5e8da132dc108ebc8581dfb72035d3b9..555b239c0a26e4317009ddc4ce9c12a50dd03b67 100644 (file)
@@ -1,8 +1,6 @@
 use std::ffi::{OsString, OsStr};
 use std::path::Path;
 
-use core::Source;
-use sources::PathSource;
 use ops::{self, ExecEngine, ProcessEngine, Compilation};
 use util::{self, CargoResult, CargoTestError, ProcessError};
 
@@ -63,11 +61,6 @@ pub fn run_benches(manifest_path: &Path,
 fn compile_tests<'a>(manifest_path: &Path,
                      options: &TestOptions<'a>)
                      -> CargoResult<Compilation<'a>> {
-    let config = options.compile_opts.config;
-    let mut source = try!(PathSource::for_path(&manifest_path.parent().unwrap(),
-                                               config));
-    try!(source.update());
-
     let mut compilation = try!(ops::compile(manifest_path, &options.compile_opts));
     compilation.tests.sort();
     Ok(compilation)